//
//  AttackModel.m
//  GiftNote
//
//  Created by wsh on 15/8/12.
//  Copyright (c) 2015年 GN. All rights reserved.
//

#import "AttackModel.h"

@implementation AttackModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}

- (instancetype)init{
    if (self = [super init]) {
        self.channels = [NSMutableArray arrayWithCapacity:0];
    }
    return self;
}


-(void)setValue:(id)value forKey:(NSString *)key{
    
    if ([key isEqualToString:@"id"]) {
        
        self.attackid = value;
        
    } else if([key isEqualToString:@"channels"]){
        
        for (NSDictionary *dic in value) {
            channelsModel *model = [[channelsModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [self.channels addObject:model];
        }
        
    } else {
        
        [super setValue:value forKey:key];
    }
}

@end
